/**
 * 表示一个订单的确认状态。
 * @author jeff
 * 
 */
package com.hk.commons.enm;

public enum ConfirmStatusEnum {
	
	CONFIRMSTATUS_0("0", "确认失败 "),
	
	CONFIRMSTATUS_1("1", "部分确认"),
	
	CONFIRMSTATUS_2("2", "确认成功"),
	
	CONFIRMSTATUS_3("3", "确认过程中"),
	
	//CONFIRMSTATUS_3("3", "部分确认成功-巨额赎回或者是比例认购的时候可能会发生"),
	
	CONFIRMSTATUS_4("4", "订单已回款"),
	CONFIRMSTATUS_5("5", "订单已退款"),
	
	CONFIRMSTATUS_9("9", "已撤单"),
	
	CONFIRMSTATUS_11("11", "组合订单专用 - 部分子订单确认"),
	
	CONFIRMSTATUS_12("12", "组合订单专用 - 全部子订单确认");
	
	private String code;

	private String msg;
	
	private ConfirmStatusEnum(String code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public String getCode() {
		return code;
	}

	public String getMsg() {
		return msg;
	}
	
	public static String getConfirmStatus(int i){
		String returnStr = null;
		switch(i){
		case 0: returnStr = ConfirmStatusEnum.CONFIRMSTATUS_0.getMsg(); break;
		case 1: returnStr = ConfirmStatusEnum.CONFIRMSTATUS_1.getMsg(); break;
		case 2: returnStr = ConfirmStatusEnum.CONFIRMSTATUS_2.getMsg(); break;
		case 3: returnStr = ConfirmStatusEnum.CONFIRMSTATUS_3.getMsg(); break;
		case 4: returnStr = ConfirmStatusEnum.CONFIRMSTATUS_4.getMsg(); break;
		case 5: returnStr = ConfirmStatusEnum.CONFIRMSTATUS_5.getMsg(); break;
		case 9: returnStr = ConfirmStatusEnum.CONFIRMSTATUS_9.getMsg(); break;
		case 11: returnStr = ConfirmStatusEnum.CONFIRMSTATUS_11.getMsg(); break;
		case 12: returnStr = ConfirmStatusEnum.CONFIRMSTATUS_12.getMsg(); break;

		}
		return returnStr;
	}
}
